package com.platform.config.run;

import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.weixin.demo.WeixinApiController;
import com.jfinal.weixin.demo.WeixinMsgController;
import com.jfinal.weixin.sdk.api.ApiConfigKit;

public class WeixinConfig extends JFinalConfig {
	  public void configConstant(Constants me) {
	    loadPropertyFile("weixin.properties");
	    me.setDevMode(getPropertyToBoolean("devMode", false));
	         
	    // ApiConfigKit 设为开发模式可以在开发阶段输出请求交互的 xml 与 json 数据
	    ApiConfigKit.setDevMode(me.getDevMode());
	  }
	     
	  public void configRoute(Routes me) {
	    me.add("/msg", WeixinMsgController.class);
	    me.add("/api", WeixinApiController.class, "/api");
	  }
	     
	  public void configPlugin(Plugins me) {}
	  public void configInterceptor(Interceptors me) {}
	  public void configHandler(Handlers me) {}
	}